const EventEmitter = require('events').EventEmitter
var a = new EventEmitter()
a.on('join',function(){
    console.log('welcome')
})
a.emit('join')